<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<script>
	var camelize = function(str){ 
		return str.replace(/(-)+(.)?/g, function(match, chr){
			console.log(match)
			console.log(chr)
			return chr ? chr.toUpperCase() : '' 
		}) 
	}
	console.log(camelize('word----word'))
</script>
</body>
</html>